package com.software;

import org.hibernate.Session;

public class Run {
    public static void main(String[] args) {
        Run run = new Run();
        run.get();
    }
    public void get() {
        Session session = HibernateUtils.getSession();
        // 采用load
        User user = session.load(User.class, 7);
        System.out.println(user);
        session.close();
    }
}
